using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Threading;
namespace XProject
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            //Application.EnableVisualStyles();
            //Application.SetCompatibleTextRenderingDefault(false);
           //Application.Run(new GUI.Manager());
           Thread.CurrentThread.Name = "vaf";
            bool ownsMutex;
using (Mutex mutex = new Mutex(true, "vaf", out ownsMutex))
{
if (ownsMutex)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new GUI.Manager());
mutex.ReleaseMutex();//chi duoc mo 1 chuong trinh trong cua mot thoi diem
}
else MessageBox.Show("Can't o pen 2 windows of this program at the same time", "Notify", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
       
        }
    }
}